export const routes = [
  {
    path: '/',
    name: 'index',
    redirect: { name: 'login' }
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/Login.vue')
  },
  {
    path: '/load',
    name: 'load',
    component: () => import('@/views/Load.vue')
  },
  // 导航页面
  {
    path: '/default',
    name: 'default',
    component: () => import('../layout/Default.vue'),
    redirect: { name: 'dispatch' },
    children: [
      // 统一调度
      {
        path: '/dispatch',
        name: 'dispatch',
        component: () => import('../views/dispatch/Index.vue'),
        meta: {
          title: '统一调度',
          eventOption: 'Main',
          sceneName: 'TYDD'
        }
        // children: [
        //   // 时空推进
        //   {
        //     // path: '/dispatch/:id',
        //     path: 'time',
        //     name: 'time',
        //     component: () => import('../views/dispatch/time/GoTime.vue'),
        //     meta: {
        //       title: '时空推进',
        //       eventOption: 'Time'
        //     }
        //   }
        // ]
      },
      // 时空推进
      {
        // path: '/dispatch/:id',
        path: '/dispatch/time',
        name: 'time',
        component: () => import('../views/dispatch/time/GoTime.vue')
        // meta: {
        //   title: '时空推进',
        //   eventOption: 'Time'
        // }
      },
      // 综合集控
      {
        path: '/control',
        name: 'control',
        component: () => import('../views/control/Index.vue'),
        // redirect: { name: 'mining' },
        meta: {
          title: '综合集控',
          eventOption: 'ZongHeJikong',
          sceneName: 'ZHJK'
        },
        children: [
          // 智能综采
          {
            path: 'mining',
            name: 'mining',
            component: () =>
              import('../views/control/mining/Index.vue'),
            meta: {
              title: '智能综采',
              eventOption: 'ZongCai',
              sceneName: 'ZNZC'
            },
            children: [
              {
                path: 'details/:id',
                name: 'miningDetails',
                component: () => import('../views/control/mining/details/Index.vue'),
                meta: {
                  sceneName: 'ZNZC'
                }
              }
            ]
          },
          // 智能供排水
          {
            path: 'water',
            name: 'water',
            component: () => import('../views/control/water/Index.vue'),
            meta: {
              title: '智能供排水',
              eventOption: 'GPShui',
              sceneName: 'ZNGPS'
            },
            children: [
              {
                path: 'details/:id',
                name: 'waterDetails',
                component: () => import('../views/control/water/details/Index.vue'),
                meta: {
                  sceneName: 'ZNGPS'
                }
              }
            ]
          },
          // 智能通风
          {
            path: 'ventilate',
            name: 'ventilate',
            component: () => import('../views/control/ventilate/Index.vue'),
            meta: {
              title: '智能通风',
              eventOption: 'TongFeng',
              sceneName: 'ZNTF'
            },
            children: [
              {
                path: 'details/:id',
                name: 'ventilateDetails',
                component: () => import('../views/control/ventilate/details/Index.vue'),
                meta: {
                  sceneName: 'ZNTF'
                }
              }
            ]
          },
          // 智能掘进
          {
            path: 'excavation',
            name: 'excavation',
            component: () => import('../views/control/excavation/Index.vue'),
            meta: {
              title: '智能掘进',
              eventOption: 'JueJin',
              sceneName: 'ZNJJ'
            },
            children: [
              {
                path: 'details/:id',
                name: 'excavationDetails',
                component: () => import('../views/control/excavation/details/Index.vue'),
                meta: {
                  sceneName: 'ZNJJ'
                }
              }
            ]
          },
          // 智能煤流
          {
            path: 'coalFlow',
            name: 'coalFlow',
            component: () => import('../views/control/coalFlow/Index.vue'),
            meta: {
              title: '智能煤流',
              eventOption: 'Meiliu',
              sceneName: 'ZNML'
            }
          },
          // 智能供配电
          {
            path: 'electric',
            name: 'electric',
            component: () => import('../views/control/electric/Index.vue'),
            meta: {
              title: '智能供配电',
              eventOption: 'GPDian',
              sceneName: 'ZNGPD'
            }
          }
        ]
      },
      // 安全监控
      {
        path: '/monitor',
        name: 'monitor',
        component: () => import('../views/monitor/Index.vue'),
        // redirect: { name: 'safety' },
        meta: {
          title: '安全监控',
          eventOption: 'AnQuanJianKong',
          sceneName: 'AQJK'
        },
        children: [
          // 安全监测
          {
            path: 'safety',
            name: 'safety',
            component: () =>
              import('../views/monitor/safety/Index.vue'),
            meta: {
              title: '安全监测',
              eventOption: 'AQJianCe',
              sceneName: 'AQJC'
            }
          },
          // 视频监控
          {
            path: 'video',
            name: 'video',
            component: () =>
              import('../views/monitor/video/Index.vue'),
            meta: {
              title: '视频监控',
              eventOption: 'SPJianKong',
              sceneName: 'SPJK'
            }
          },
          // 水文监测
          {
            path: 'hydrology',
            name: 'hydrology',
            component: () =>
              import('../views/monitor/hydrology/Index.vue'),
            meta: {
              title: '水文监测',
              eventOption: 'ShuiWen',
              sceneName: 'SWJC'
            }
          },
          // 矿压监测
          {
            path: 'mine',
            name: 'mine',
            component: () =>
              import('../views/monitor/mine/Index.vue'),
            meta: {
              title: '矿压监测',
              eventOption: 'KuangYa',
              sceneName: 'KYJC'
            }
          },
          // 应急演练
          {
            path: 'emergency',
            name: 'emergency',
            component: () =>
              import('../views/monitor/emergency/Index.vue'),
            meta: {
              title: '应急演练',
              eventOption: 'YJYanLian',
              sceneName: 'YJYL'
            }
          },
          // 瓦斯抽采
          {
            path: 'gas',
            name: 'gas',
            component: () =>
              import('../views/monitor/gas/Index.vue'),
            meta: {
              title: '瓦斯抽采',
              eventOption: 'WSChouCai',
              sceneName: 'WSCC'
            }
          }
        ]
      },
      // 智能决策
      {
        path: '/dicision',
        name: 'dicision',
        component: () => import('../views/dicision/Index.vue'),
        meta: {
          title: '智能决策',
          eventOption: 'ZhiNengJueCe',
          sceneName: 'ZNJC'
        }
      }
    ]
  }
];

